<!DOCTYPE html>
<html>

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no" />
    <link rel="stylesheet" href="css/style.css" />
    <link rel="stylesheet" href="css/iconfont.css" />
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <title>結賬</title>
</head>

<body class="minipage">
    <div class="wrap">
        <div class="logocon">
            <div class="logoimg "><img src="./img/logo.png " height="50px "></div>
            <div class="cont ">
                <p>O2O客戶服務平台（EC2）</p>
                <p>請關注粉絲專頁 <a href="javascript ">福皓整合科技</a></p>
            </div>
            <!-- <div class="sharecon ">
                    <iframe src="https://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2FFull2house%2F&amp;width=50&amp;layout=box_count&amp;action=like&amp;size=large&amp;show_faces=false&amp;share=false&amp;height=65&amp;appId=382298112140973 " width="50 " height="65 " style="border:none;overflow:hidden " scrolling="no " frameborder="0 " allowtransparency="true "></iframe>
                </div> -->
        </div>
        <section class="form">
            <ul>
                <li>
                    <p class="q">寄貨方式</p>
                    <p class="a">
                        <span class="form-space">
                            <label>
                                <input name="form-send" type="radio" value="1" checked class="ace">
                                <span class="lbl"> 郵寄（運費 $0.00）</span>
                        </label>
                        </span>
                    </p>
                </li>
                <li>
                    <p class="q">付款方式</p>
                    <p class="a">
                        <span class="form-space">
                            <label>
                                <input name="form-pay" type="radio" value="1" checked class="ace">
                                <span class="lbl"> 貨到付款</span>
                        </label>
                        </span>
                    </p>
                </li>
                 <li>
                    <p class="q">優惠碼</p>
                    <p class="a">
                        <span class="form-space">
                            <label>
                                <input name="" type="radio" value="1" class="ace">
                                <span class="lbl"> 優惠券紅包（NT$20）</span>
                        </label>
                        </span>
                        <div class="discount">
                        <p>點數折抵（目前有<em>1800</em>點）</p>
                        <p><input name="" type="text" placeholder="抵扣點數"> 可抵扣（<em>10</em>元）</p>
                        </div>
                    </p>
                </li>
                <li>
                    <p class="q">收件人姓名<em>*</em></p>
                    <p class="a">
                        <input class="form-control" type="text" id="name" name="name" placeholder="姓名">
                    </p>
                </li>
                <li>
                    <p class="q">收件人電話<em>*</em></p>
                    <p class="a">
                        <input class="form-control" type="text" id="phone" placeholder="電話">
                    </p>
                </li>
                <li>
                    <p class="q">收件地址<em>*</em></p>
                    <p class="a">
                       <span class="addr">
                       <select class="city"><option>台北市</option><option>高雄市</option></select>
                       <select class="district"><option>太安區</option><option>泰康區</option></select>
                       <input class="code" type="text"  placeholder="">
                       </span>
                        <textarea class="form-control" id="address" placeholder=""></textarea>
                    </p>
                </li>
            </ul>
        </section>
        <div class="btn-con">
            <a id="buy" href="javascript:;" class="btn btn-green buy">結賬</a>
        </div>
    </div>
    <script src="./js/base.js"></script>
    <script src="./js/touchwipe.min.js"></script>
    <script type="text/javascript">
        $(function() {

            $(document).on('click', '#buy', function(e) {
                toSubmit($(this));
            })

        })

        function toSubmit($this) {
            if ($this.attr('disabled')) return;
            var regPartton = /1[3-9][0-9]{9}$/;
            var data = {};
            data.name = $('#name').val();
            data.send = $("input[name='form-send']:checked").val();
            data.pay = $("input[name='form-pay']:checked").val();
            data.phone = $('#phone').val();
            data.address = $("#address").val();


            if (mybase.isEmpty(data.name)) {
                alert("请输入姓名");
                return;
            } else if (mybase.isEmpty(data.phone)) {
                alert("请输入手机号");
                return;
            } else if (!regPartton.test(data.phone)) {
                alert("请输入正确的手机号");
                return;
            } else if (mybase.isEmpty(data.address)) {
                alert("请输入寄货地址");
                return;
            }

            $this.attr('disabled', true);

            /*$.ajax({
            type: 'post',
            async: false,
            url: '',
            data: data,
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                $('#submitBtn').removeAttr('disabled');
                alert('网络异常,请稍后再试!');
            },
            success: function(msg) {
                if (msg.status == '200') {
                    $('#name').val('');
                    $('#phone').val('');
                    $('#address').val('');
                    $('#buy').removeAttr('disabled');
                    alert('提交成功，请耐心等待！');
                } else {
                    alert('提交失败啦！');
                }
            }

        });
*/


        }
    </script>
</body>

</html>